﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/main.master" EnableViewState="false"
    CodeFile="script_example_01.aspx.cs" Inherits="sdk_category_script_example_01" %>

<%@ Register Src="../../modules/categories_v2.ascx" TagName="categories" TagPrefix="uc1" %>
<asp:Content ID="hd" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" type="text/css" href="../style.css" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>Create Simple Category Listing - ASP.NET Category Script 2.0</title>
</asp:Content>
<asp:Content ID="pagecontent" ContentPlaceHolderID="MC" runat="server">
    <div id="msg" runat="server">
    </div>
    <div class="main_block ui-corner-all">
        <div class="item">
            <div class="item">
                <div class="module ui-corner-all">
                    <a id="hm" class="bld" runat="server"></a>&nbsp;&gt;&nbsp;<a id="sdk" class="bld"
                        runat="server"></a>&nbsp;&gt;&nbsp;<a id="vd" class="bld" runat="server"></a>&nbsp;&gt;&nbsp;Category Listing
                </div>
            </div>
            <div class="item_pad">
                <div class="module ui-corner-all">
                    <div class="heading">
                        <h3 id="cmt" runat="server">
                            Create Simple Category Listing
                        </h3>
                    </div>
                    <div class="pd_5 ptext">
                        <p class="bgtext">
                            This example will load parent categories and generate simple category listings
                        </p>
                    </div>
                </div>
            </div>
            <div class="item_pad">
                <div class="module ui-corner-all">
                    <div class="heading">
                        <h3>
                            Examples &amp; Codes
                        </h3>
                    </div>
                    <div class="pd_5 ptext">
                       
                        <div class="cscroll">
<pre class="csharpcode">
<span class="rem">// Code Behind</span>
<span class="kwrd">if</span> (cat != <span class="kwrd">null</span>)
{
   cat.HeadingTitle = <span class="str">"Categories"</span>;
   cat.Type = 13; <span class="rem">// 0: videos, 1: groups, 2: channels, 4: abuse reports, 5: photos 6: blogs 7: audio files, 8: galleries, 12 forum</span>
   cat.MainCategoryURL = <span class="kwrd">false</span>; <span class="rem">// true: single page for every type of content, false: single page for every type of content</span>
   cat.Total_Records = 10; <span class="rem">// display 10 records, if isAll=false</span>
   cat.ShowParentsOnly = <span class="kwrd">true</span>;
   cat.MoreLinkText = <span class="str">"more"</span>;
   cat.MoreLinkToolTip = <span class="str">"Browse all categories"</span>;
   cat.MoreLinkUrl = <span class="str">"categories/"</span>;
   cat.URL = <span class="str">"#"</span>;
   cat.isAll = <span class="kwrd">false</span>;
}</pre>
                        </div>
                    </div>
                </div>
            </div>
            <div class="item_pad" style="width: 600px;">
                <uc1:categories ID="cat" runat="server" />
            </div>
         
            <div class="item_pad">
                <div class="module ui-corner-all">
                    <!-- AddThis Button BEGIN -->
                    <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
                        <a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2">
                        </a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4">
                        </a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style">
                        </a>
                    </div>
                    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=mediasoftpro"></script>
                    <!-- AddThis Button END -->
                </div>
            </div>
        </div>
    </div>
</asp:Content>
